<?php

include_once 'model/movie.php';

$conn = mysql_connect('localhost','root','');
if(!$conn){
    die('Could not connect..');
}
mysql_select_db('dbtraining',$conn);


echo "{success:true,rows:".Movie::loadsToJSON()."}";

mysql_close($conn);

?>
